import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

class CustomViewMoudel extends StatelessWidget {
  final String ?text;

  CustomViewMoudel({this.text}) : super();

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(text??""),
      ),
      body: Column(
        children: [
          Padding(
            padding: EdgeInsets.all(20),
            child: Row(
              ///在Column+Row的嵌套中, 因为Row默认只有一行, Text的maxLines属性会失效,需要在外面套一个Expanded
              crossAxisAlignment: CrossAxisAlignment.start,
              children: <Widget>[
                Expanded(
                    child: Text(
                        "涵盖绝大部分的UI组件：TextView、Button、EditText、ImageView、Spinner、Picker、Dialog、PopupWindow、ProgressBar、LoadingView、StateLayout、FlowLayout、Switch、Actionbar、TabBar、Banner、GuideView、BadgeView、MarqueeView、WebView、SearchView等一系列的组件和丰富多彩的样式主题。",
                        maxLines: 4,
                        softWrap: true,
                        overflow: TextOverflow.ellipsis,
                        style: TextStyle(color: Colors.grey, fontSize: 12.0)))
              ],
            ),
          ),
          SizedBox(
            height: 50,
          ),
          Container(
            padding: EdgeInsets.all(10),
            alignment:Alignment.center,
            height: 200,
            child: Card(
              color: Colors.white,
              elevation: 5,
              shape: ContinuousRectangleBorder(
                borderRadius: BorderRadius.all(Radius.circular(20))
              ),
              shadowColor: Colors.white70,
              child: Column(
                children: [
                  SizedBox(
                    height: 10,
                  ),
                  Text("银行卡信息",style: TextStyle(color: Colors.black87,fontSize: 15,fontWeight: FontWeight.w800),),
                  Row(
                    children: [
                      Expanded(
                          flex: 3,
                          child: Container(margin:EdgeInsets.only(left: 10),child: Text("银行账户"),)),
                      Expanded(
                          child: Icon(
                            Icons.favorite,
                            color: Colors.orange,
                          ))
                    ],
                  ),
                  Positioned(
                    top: 150,
                    right: 100,
                    child: Container(
                      color: Colors.yellow,
                      child: Text("第二个组件"),
                    ),
                  ),
                ],

              ),

            ),
          ),
          SizedBox(
            height: 50,
          ),


        ],
      ),
    );
  }
}
